<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" +request.getServerPort() + path + "/";
%>
<!-- 不能直接登陆修改页面，如果直接登陆该页面，则页面转向到商品管理页面 -->
<c:if test="${cid==null}">
<c:redirect url="product.jsp"></c:redirect>
</c:if>
<jsp:include page="head.jsp"></jsp:include>  
	<div class="main">
		<h2>修改商品</h2>
		<div class="manage">
			<form action="<%=basePath %>ChangeAddDeleteProduct_Servlet?cid=${cid}&manage=change"  enctype="multipart/form-data" method="post" accept-charset="utf-8" id="fm" >
			  <!-- input表单中的hidden属性可以把其隐藏 -->
			  <input type="hidden"  name="cid"  value="${cid}" />
				<table class="form">
					<tr>
						<td class="field">商品名称(*)：</td>
						<td><input type="text" class="text" name="productName" /></td>
					</tr>
                    <tr>
						<td class="field">描述：</td>
						<td><input type="text" class="text" name="productDetail" /></td>
					</tr>
					<tr>
						<td class="field">所属分类：</td>
						<td>
							<select name="parentId">
							<c:forEach items="${SmallClassify}" var="obj" >
							   <option value="${obj.small_id}">${obj.small_name}---${obj.big_name}</option>
							</c:forEach>
							</select>
						</td>
					</tr>					
					<tr>
						<td class="field">商品价格(*)：</td>
						<td><input type="text" class="text tiny" name="productPrice" /> 元</td>
					</tr>
					
					<tr>
						<td class="field">库存(*)：</td>
						<td><input type="text" class="text tiny" name="productNumber" /></td>
					</tr>
					<tr>
						<td class="field">商品图片：</td>
						<td><input type="file" class="text" name="photo" /></td>
					</tr>
					<tr>
						<td></td>
						<td><label class="ui-blue"><input type="submit" name="submit" value="确定" /></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer" style="margin-left:400px">
	Copyright &copy; 2017云和学院 All Rights Reserved. 京ICP证1000001号</div>
</body>
</html>